<?php
namespace app\index\controller;

use dreamphp\core\Controller;
use dreamphp\core\Db;

class Index extends Controller
{
	public function index()
	{
		$sql = "select * from student where id = 1";
		$result = Db::getInstance()->find($sql);
		$viewData = [
			'username' => 'DreamPHP',
			'age' => 25,
			'data' => $result
		];
		$this->assign($viewData);
		$this->fetch();
	}
}
